import {
  request
} from "../utils/http.js"
module.exports = {
  // 登录
  login: (data = {}) => request('/login', data),
  getAppConfig: (data = {}) => request('/app/config/get', data),
  userUpdate: (data = {}) => request('/user/update', data),
  userInfo: (data = {}) => request('/member/card/balance/change', data),
  //首页-baner
  getSwiperImgs: (data = {}) => request('/swiperImgs/list', data),
   //会员卡
   memberCardBalanceLog: (data = {}) => request('/member/card/balance/change', data),
   memberCardInfo: (data) => request(`/member/card/${data.id}`, data),
  //公司信息
  getCompanyList: (data = {}) => request('/company/list', data),
  getCompanyById: (data = {}) => request('/company/getOne', data),
  //商品分类
  goodsForOrder: (data) => request(`/goods/for/order`, data),
  goodsDetails: (data) => request(`/goods/get/${data.id}`, data),
  getHotCombination: (data) => request(`/goods/hotCombination/${data.id}`, data),//热门组合
  categoryList: (data = {}) => request('/category/list', data),
  goodsListPage: (data = {}) => request('/goods/list', data),
  //加入购物车
  cleanShoppingCart: (data = {}) => request('/shopping/cart/del', data),
  addShoppingCart: (data = {}) => request('/shopping/cart/add', data),
  shoppingCartBill: (data = {}) => request('/shopping/cart/bill', data),
  updateshoppingCartNum: (data = {}) => request('/shopping/cart/update/num', data),
  //优惠券
  couponList: (data = {}) => request('/userCouponRel/list', data),
  couponReceive: (data = {}) => request('/userCouponRel/receive', data),
  //订单信息
  orderNew:(data = {}) => request('/order/new', data),
  orderAddByShoppingCar: (data = {}) => request('/order/add/by/shoppingCar', data),
  orderPage: (data = {}) => request('/order/page', data),
  orderDel: (data = {}) => request('/order/del', data),
  orderDetail: (data) => request(`/order/detail/${data.id}`, data),
  //支付单
  payOrderTodo: (data = {}) => request('/payOrder/todo', data),//待办支付
  paySubmit: (data = {}) => request('/payOrder/paySubmit', data),//支付提交
  //地址信息
  addressDefaultOne: (data = {}) => request('/address/getDefault', data),
  addressList: (data = {}) => request('/address/list', data),
  addressDel: (data) => request(`/address/del/${data.id}`, data),
  addressAddOrUpdate: (data = {}) => request('/address/addOrUpdate', data),
  //签到
  signLogAdd: (data = {}) => request('/sign/log/add', data),
  signLogList: (data = {}) => request('/sign/log/list', data),
  //运费
  calculateMoney: (data = {}) => request('/freightChargesAdapter/calculateMoney', data),
  //获取文字
  getArticleByName: (data = {}) => request('/mk/article/byName', data),
}